#include<stdio.h>

int main()
{
	int height[10];
	int b, c, all = 0;
	for (int i = 0; i < 10; i++)
	{
		scanf_s("%d", &height[i]);
	}
	scanf_s("%d", &b);
	c = b + 30;
	for (int i = 0; i < 10; i++)
	{
		if (height[i] <= c)
		{
			all++;
		}
	}
	printf("%d", all);
	
	return 0;
}